-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lxd: add support for interim Ubuntu releases #219
Conversation
f440e2b
to
827dfff
Compare
From lpcraft side - it works like a charm! Thanks a lot! |
Signed-off-by: Callahan Kovacs <[email protected]>
Signed-off-by: Callahan Kovacs <[email protected]>
Signed-off-by: Callahan Kovacs <[email protected]>
827dfff
to
9f0d4f1
Compare
df69233
to
ce86d63
Compare
The previous `configure_buildd_image_remote` function now points to the new method. Signed-off-by: Callahan Kovacs <[email protected]>
Signed-off-by: Callahan Kovacs <[email protected]>
Signed-off-by: Callahan Kovacs <[email protected]>
ce86d63
to
c7eaad9
Compare
Feedback from PR. Signed-off-by: Callahan Kovacs <[email protected]>
Signed-off-by: Callahan Kovacs <[email protected]>
Signed-off-by: Callahan Kovacs <[email protected]>
5fb93b5
to
058d5b0
Compare
Quick heads-up - we faced a (short) production regression after deploying these changes, as it looks like that after my review some more changes were made, especially the work around As I have tried the previous state of that branch, my local lxc installation was already configured with the buildd remote ( Also, the changelog for 1.8.0 is missing, see #233 and https://github.com/canonical/craft-providers/blob/c6e624516dbb76ff60abfe9a2459bffe288d5e0e/docs/changelog.rst Thanks to my colleague @lgp171188 we noticed that issue rather quickly, we rolled it back, and I was able to provide a fix for lpcraft. Anyway, it works now, thanks a lot for your work! P.S.: And looks like I need some more isolated test environment. |
Overview
This PR adds support for interim and devel Ubuntu releases with LXD.
Broken into 6 separate commits to speed up review time.
Details
Previously, craft-providers maintained a list of valid LXD images with a simple enum. Now, the
remotes.py
module has a new dataclass calledRemoteImage
and a dictionary of validRemoteImages
to track what images are supported.It is designed in such a way that users can add custom remotes and we'll be able to add support for other bases (like a centos base) without breaking changes.
Usage
For applications using the
LxdProvider
class (snapcraft, charmcraft, and rockcraft), there are no changes in behavior or usage. You can simply pass in the new release names:For other applications (lpcraft 👀), you'll need to use the replace the old
configure_buildd_image_remote()
function with the newget_remote_image()
function.Note - the old function
configure_build_image_remote()
still exists and its behavior is unchanged, except for a deprecation notice.Example usage
TODO
Sources
(CRAFT-1601)